package com.dragon.modules.yuegou.model.member;

import com.dragon.modules.yuegou.entity.member.ShoppingCartEntity;
import com.dragon.modules.yuegou.enums.member.ShoppingCartShoppingType;
import com.dragon.modules.yuegou.enums.product.SpuPublishStatus;
import com.dragon.modules.yuegou.model.product.Attribute;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 购物车模型类
 * 
 * @author pbuilder generated
 * @date 2019-04-17 15:08:01
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class ShoppingCart extends ShoppingCartEntity {

	@ApiModelProperty("sku名称")
	private String skuTitle;

	@ApiModelProperty("主图")
	private String mainImages;

	@ApiModelProperty("折后价")
	private BigDecimal discountPrice;

	@ApiModelProperty("会员价")
	private BigDecimal memberPrice;

	/** [枚举]上架状态：0-下架-LOWER、1-上架-UPPER */
	@ApiModelProperty("[枚举]上架状态：0-下架-LOWER、1-上架-UPPER")
	private SpuPublishStatus publishStatus;

	@ApiModelProperty("库存")
	private Integer stock;

	@ApiModelProperty("规格列表")
	private List<Attribute> attributeList;

	@ApiModelProperty("原价")
	private BigDecimal originalPrice;

	@ApiModelProperty("spuId")
	private String spuId;

	@ApiModelProperty("是否使用会员价")
	private Boolean usedMemberPrice;

	@ApiModelProperty("售卖开始时间")
	private LocalDateTime sellBeginTime;

	/**
	 * 构造一个空购物车模型对象
	 */
	public ShoppingCart(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个购物车模型对象
	 * 
	 * @param entity 实体对象
	 */
	public ShoppingCart(ShoppingCartEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个购物车模型对象
	 * 
	 * @param other 其它对象
	 */
	public ShoppingCart(ShoppingCart other){
		super(other);
	}

	public String getSpuId() {
		return spuId;
	}

	public void setSpuId(String spuId) {
		this.spuId = spuId;
	}

	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public ShoppingCart id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置会员id
	 * 
	 * @param memberId 会员id
	 * @return 当前对象
	 */
    public ShoppingCart memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置
	 * 
	 * @param busdId 
	 * @return 当前对象
	 */
    public ShoppingCart busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	public LocalDateTime getSellBeginTime() {
		return sellBeginTime;
	}

	public void setSellBeginTime(LocalDateTime sellBeginTime) {
		this.sellBeginTime = sellBeginTime;
	}

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public ShoppingCart merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public ShoppingCartShoppingType getShoppingType() {
    	return shoppingType;
    }

    /**
	 * 设置[枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME
	 * 
	 * @param shoppingType [枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME
	 * @return 当前对象
	 */
    public ShoppingCart shoppingType(ShoppingCartShoppingType shoppingType) {
    	this.shoppingType = shoppingType;
    	return this;
    }
	@Override
	public String getSkuId() {
    	return skuId;
    }

    /**
	 * 设置商品id
	 * 
	 * @param skuId 商品id
	 * @return 当前对象
	 */
    public ShoppingCart skuId(String skuId) {
    	this.skuId = skuId;
    	return this;
    }

	@Override
	public Integer getSkuQuantity() {
    	return skuQuantity;
    }

    /**
	 * 设置商品数量
	 * 
	 * @param skuQuantity 商品数量
	 * @return 当前对象
	 */
    public ShoppingCart skuQuantity(Integer skuQuantity) {
    	this.skuQuantity = skuQuantity;
    	return this;
    }

	@Override
	public Boolean getStatus() {
    	return status;
    }

    /**
	 * 设置是否已下单：0 未下单 1 已下单
	 * 
	 * @param status 是否已下单：0 未下单 1 已下单
	 * @return 当前对象
	 */
    public ShoppingCart status(Boolean status) {
    	this.status = status;
    	return this;
    }

	@Override
	public Boolean getUseMemberPrice() {
    	return useMemberPrice;
    }

    /**
	 * 设置是否使用会员价
	 * 
	 * @param useMemberPrice 是否使用会员价
	 * @return 当前对象
	 */
    public ShoppingCart useMemberPrice(Boolean useMemberPrice) {
    	this.useMemberPrice = useMemberPrice;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public ShoppingCart createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedTime 
	 * @return 当前对象
	 */
    public ShoppingCart modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }

	@Override
	public Boolean getDel() {
    	return del;
    }

    /**
	 * 设置逻辑删除，1表示已删除,0表示未删除
	 * 
	 * @param del 逻辑删除，1表示已删除,0表示未删除
	 * @return 当前对象
	 */
    public ShoppingCart del(Boolean del) {
    	this.del = del;
    	return this;
    }

	@Override
	public LocalDateTime getDelTime() {
    	return delTime;
    }

    /**
	 * 设置
	 * 
	 * @param delTime 
	 * @return 当前对象
	 */
    public ShoppingCart delTime(LocalDateTime delTime) {
    	this.delTime = delTime;
    	return this;
    }

	@Override
	public String getSkuAttr() {
    	return skuAttr;
    }

    /**
	 * 设置规格属性 JSON存储
	 * 
	 * @param skuAttr 规格属性 JSON存储
	 * @return 当前对象
	 */
    public ShoppingCart skuAttr(String skuAttr) {
    	this.skuAttr = skuAttr;
    	return this;
    }
	public String getSkuTitle() {
		return skuTitle;
	}

	public void setSkuTitle(String skuTitle) {
		this.skuTitle = skuTitle;
	}

	public String getMainImages() {
		return mainImages;
	}

	public void setMainImages(String mainImages) {
		this.mainImages = mainImages;
	}

	public BigDecimal getDiscountPrice() {
		return discountPrice;
	}

	public void setDiscountPrice(BigDecimal discountPrice) {
		this.discountPrice = discountPrice;
	}

	public BigDecimal getMemberPrice() {
		return memberPrice;
	}

	public void setMemberPrice(BigDecimal memberPrice) {
		this.memberPrice = memberPrice;
	}

	public BigDecimal getOriginalPrice() {
		return originalPrice;
	}

	public void setOriginalPrice(BigDecimal originalPrice) {
		this.originalPrice = originalPrice;
	}

	public SpuPublishStatus getPublishStatus() {
		return publishStatus;
	}

	public void setPublishStatus(SpuPublishStatus publishStatus) {
		this.publishStatus = publishStatus;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public List<Attribute> getAttributeList() {
		return attributeList;
	}

	public void setAttributeList(List<Attribute> attributeList) {
		this.attributeList = attributeList;
	}
}
